module.exports = async (ctx, next) => {
  const path = require('path')
  const fileRead = require('../utils/file_utils')
  const url = ctx.request.url
  console.log(url);
  let filePath = '../data' + url.replace('/api', '') + '.json'
  filePath = path.join(__dirname, filePath)
  console.log(filePath);
  const data = await fileRead(filePath)
  ctx.response.body=data

}